<template>
  <div class="contentManager">
    <div></div>
    <main>
      <!-- 右侧主内容区 -->
      <div class="main-right">
        <dynamic-form :sendData="someData">
        </dynamic-form>
      </div>
    </main>
  </div>
</template>

 <script>
 import Vue from 'vue'
 import Element from 'element-ui'
 import 'element-ui/lib/theme-chalk/index.css'
 import 'element-ui/lib/index.js'
 Vue.use(Element)
 import dynamicForm from './../../components/dynamic-form.vue'
 import dynamicTable from './../../components/dynamic-table.vue'


 export default {
  name: 'updateContent',
  components:{
    dynamicForm, dynamicTable
  },
  props: [

   ],
  data: function (){
    return {
     active:true,
     //表格数据
     someData: {
                 "formItemList": [
                 {
                 "type": "input",
                 "label": "图片",
                 "disable": false,
                 "readonly": false,
                 "value": "/asfd/asdf.jpg",
                 "placeholder": "",
                 "rules": [],
                 "key": "pic",
                 "subtype": "text",
                 "text":"/asfd/asdf.jpg"
                 },
                  {
                   "type": "input",
                   "label": "文件",
                   "disable": false,
                   "readonly": false,
                   "value": "",
                   "placeholder": "",
                   "rules": [],
                   "key": "file",
                   "subtype": "text",
                   "text":"/asfd/asdf.txt"
                   },
                 {
                  "type": "input",
                  "label": "描述",
                  "disable": false,
                  "readonly": false,
                  "value": "",
                  "placeholder": "",
                  "rules": [],
                  "key": "desc",
                  "subtype": "text",
                  "text":"某某内容1"
                  }
                 ]
                }


    }
  },
  watch:{

  },
  methods: {
    handleInput(val, key) {
      // 这里element-ui没有上报event，直接就是value了
      this.$emit('input', { ...this.value, [key]: val })
      console.log('handleInput')
    }
  },
  mounted() {
   },
  render:{
  }
 }
 </script>

 <style>
     #contentManager {
         font-family: Helvetica, sans-serif;
         text-align: center;
     }
 </style>
